/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hugoo.test;

/**
 *
 * @author Lovelock.Chan
 */
public class T5 {
    public static void main(String[] args) {
        String Agent="Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko".toLowerCase();
        System.out.println("Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko".toLowerCase().matches("(msie\\s|trident.*rv:)([\\w.]+)"));
        System.out.println(Agent.contains("msie") || (Agent.contains("trident/") && Agent.contains("rv:")));
        System.out.println("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) ; .NET CLR 2.0.50727; InfoPath.2)".toLowerCase().matches("(msie)"));
    }
}
